<template>

<table class="table table-bordered">
    <tr>

        <th>
`           姓名
            
        </th>
        <th>
          <input type="text" v-model="aa.Name">
            
        </th>
    </tr>


      <tr>

        <th>
           账号
            
        </th>
        <th>
           <input type="text" v-model="aa.Member_Name">
            
        </th>
    </tr>
        
    <tr>

<th>
   密码
    
</th>
<th>
   <input type="password" v-model="aa.Member_Pwd">
    
</th>
</tr>

<tr>

<th>
   手机号
    
</th>
<th>
   <input type="text" v-model="aa.Member_Phone">
    
</th>
</tr>

<tr>

<th>
   性别
    
</th>
<th>
   <input type="radio"  value="true" v-model="aa.Member_Sex">男
   <input type="radio"  value="false" v-model="aa.Member_Sex">女
    
</th>
</tr>

<tr>

<th>
   身份证
    
</th>
<th>
   <input type="text" v-model="aa.Member_IdCard">
    
</th>
</tr>

<tr>

<th>
   生日
    
</th>
<th>
   <input type="date" v-model="aa.Member_Birthday">
    
</th>
</tr>

<tr>

<th>
   价钱
    
</th>
<th>
   <input type="text" v-model="aa.Member_Money">
    
</th>
</tr>

<tr>

<th>
   状态
    
</th>
<th>
   <input type="radio" value="true" v-model="aa.Member_State">正常
   
    <input type="radio" value="false" v-model="aa.Member_State">冻结
    
</th>
</tr>


<tr>

<th>
   积分
    
</th>
<th>
   <input type="text" v-model="aa.Member_Integration">
    
</th>
</tr>

<tr>

<th>
   身份
    
</th>
<th>
  <select v-model="aa.MemberType_Id">

        <option :value="-1">--请选择--</option>
        <option  v-for="item in Xialala" :value="item.MemberType_Id">{{ item.MemberType_Name }}</option>
  </select>
    
</th>
</tr>


<tr>

<th>
   会员等级
    
</th>
<th>
  <select v-model="aa.Rank_id">

        <option :value="-1">--请选择--</option>
        <option  v-for="item in Xialala2" :value="item.Rank_Id">{{ item.Rank_Name }}</option>
  </select>
    
</th>
</tr>

<th>

</th>

<tr>
<th>


 <button>添加</button>
    
</th>
</tr>



</table>


</template>


<script setup lang="ts">



import axios from 'axios';
import {onMounted, ref} from 'vue';

const  aa = ref({


  "Member_Pwd": "string",
  "Member_Name": "string",
  "Name": "string",
  "Member_Phone": "string",
  "Member_Sex": true,
  "Member_Birthday": "2024-12-17T08:57:2",
  "Member_IdCard": "string",
  "Member_Money": 0,
  "Member_State": true,
  "Member_Integration": 0,
  "MemberType_Id": 0,
  "Rank_id": 0,

}
)



onMounted(()=>{

    XiaLa1();
    XiaLa2();
})

const Xialala =ref([{

     "MemberType_Id": -1,
    "MemberType_Name": ""

}])


const XiaLa1=()=>{

    axios.get('https://localhost:7035/api/Member/ShowSf').then(res=>{

        Xialala.value=res.data;

    })

}

const Xialala2 =ref([{

    "Rank_Id": 1,
    "Rank_Name": "青铜",
    "Rank_State": true,
    "Rank_MaxPoint": 0,
    "Rank_MinPoint": 100,
    "Rank_IsDel": true,
    "Rank_DeleteTime": "2024-05-05T00:00:00"

}])

const XiaLa2=()=>{

    axios.get('https://localhost:7035/api/Rank/ShowRank').then(res=>{

        Xialala2.value=res.data;

})
}










</script>